import json
import re
import numpy as np


def cut_text(text, lenth):
    number = []
    times= int(len(text) / lenth)
    for i in range(times):
        number.append(int(text[lenth * i:lenth * (i + 1)]))
    # print(number)
    return number, times

def get_data():
    with open("777.json", 'r') as load_f:
        chess = json.load(load_f)
    a = [[]]
    for i in range(len(chess)):
        b = []
        number, i = cut_text(chess[i]['text'], 4)
        if i % 2==1: b.append(1)
        else: b.append(-1)
        b.append(number)
        a.append(b)
    a = a[1:]
    return a